# The name of your library (remember to also configure the same name
# and the creator ID inside of the .def file).

LIBNAME  = TestLib

# The oject files of your library.

LIBOBJS  = $(LIBNAME).o

# The standard names of gcc/prc-tools binaries.

CC       = m68k-palmos-gcc
BUILDPRC = build-prc

# You do not need to change anything below this point.

CFLAGS   = -O2 -Wall -Wno-switch -DLIBNAME=\"$(LIBNAME)\"
LDFLAGS  = -L. -e start -nostartfiles
OBJS     = plualib.o plualib-dispatch.o $(LIBOBJS)
LIBS     = -lnfm

all: $(LIBNAME).prc

$(LIBNAME).prc: $(LIBNAME).def $(LIBNAME) 
	$(BUILDPRC) -o $(LIBNAME).prc $(LIBNAME).def $(LIBNAME) 

$(LIBNAME): $(OBJS)
	$(CC) $(CFLAGS) $(LDFLAGS) $(OBJS) $(LIBS) -o $(LIBNAME)

clean:
	rm -f $(LIBOBJS) $(LIBNAME) $(LIBNAME).prc
